package generator;

import com.redoornetwork.framework.generator.mybatis.GeneratorBuild;
import com.redoornetwork.framework.generator.mybatis.Table;
import com.redoornetwork.framework.generator.mybatis.configurer.DataSourceConfigurer;
import com.redoornetwork.framework.generator.mybatis.configurer.GeneratorConfigurer;

/**
 * Created by Floki on 2017/9/29.
 */
public class CodeGenerator {
	public static void main(String[] args) {
		DataSourceConfigurer dsConfigurer = new DataSourceConfigurer("jdbc:mysql://172.169.101.7:3306/app_asset_of_stake", "app_asset_of_stake", "Stake2018", "com.mysql.jdbc.Driver");
		GeneratorConfigurer configurer = GeneratorBuild.configurer(dsConfigurer, "wangjunlei", "com.redoor.app.stake.basicdata");

		//生成数据表对应的java类(包含model、criteria、mapper、dao、service、serviceImpl、controller)
//		GeneratorBuild.configurer(configurer)
//				.table(new Table("base_user", "uuid", "String"))
//				.table(new Table("base_menu", "uuid", "String"))
//				.table(new Table("base_role", "uuid", "String"))
//				.table(new Table("base_role_menu", "uuid", "String"))
//				.table(new Table("base_user_role", "uuid", "String"))
//				.table(new Table("base_user_org", "uuid", "String"))
//				.mapper().criteria().service().impl().controller().dao().model();


		GeneratorBuild.configurer(configurer)
				.table(new Table("base_chargerfeemodel_info", "uuid", "String"))
				.mapper().service().impl().controller().dao().model().criteria();
	}
}
